package com.hanbang.maige.mode.enumeration;

/**
 * 作者　　: 李坤
 * 创建时间:2016/9/2　11:01
 * 邮箱　　：496546144@qq.com
 * <p>
 * 功能介绍：http的返回值
 */

public enum HuoDongStatus {


    NO_START(1, "未开始", "未开始报名"), ACTIONING(2, "进行中", "我要报名"), STOP(3, "已结束", "已结束"), WEIZHI(100, "未知", "未知");

    private String valuse;
    private String hint;
    private int key;

    HuoDongStatus(int key, String valuse, String hint) {
        this.valuse = valuse;
        this.key = key;
        this.hint = hint;
    }

    public String getValuse() {
        return valuse;
    }

    public String getHint() {
        return hint;
    }

    public int getKey() {
        return key;
    }

    public static HuoDongStatus getState(int status) {
        if (status == HuoDongStatus.NO_START.getKey()) {
            return NO_START;
        } else if (status == HuoDongStatus.ACTIONING.getKey()) {
            return ACTIONING;
        } else if (status == HuoDongStatus.STOP.getKey()) {
            return STOP;
        } else if (status == HuoDongStatus.WEIZHI.getKey()) {
            return WEIZHI;
        }
        return WEIZHI;
    }
}
